<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>北京联合大学</title>
</head>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://at.alicdn.com/t/font_835526_xufba1hg66.css">
<link rel="stylesheet" href="../../css/Initialization.css">
<link rel="stylesheet" href="../../css/commen.css">
<link rel="shortcut icon" href="../../imgs/bitbug_favicon.ico" type="image/x-icon">
<body>
<header id='header'>
    <div class="headerleft">
        <img src="../../imgs/1572951588(1).jpg" alt="">
        <span>北京联合大学国际商务综合实训系统--老师端（<span th:text="${gradename}"></span>）</span>
    </div>
    <div class="headerright">
        <select id="gradeid" style="color:#23527c">
            <option value="0">请选择学年</option>
            <option th:each="depart : ${departs}" th:value="${depart.id}" th:text="${depart.departname}" th:selected="${gradeid == depart.id}">请选择学年</option>
        </select>
        <span>欢迎</span>
        <span> <i class="iconfont icon-user"></i>  </span>
        <span style="margin-right: 10px;" th:text="${person.realname} + ' 老师'">李国庆 同学</span>
        <a href="exit" style="color: #fff!important;"><span><i class="iconfont icon-tuichu"></i> </span><span> 退出</span></a>
    </div>
</header>
<div id="content">
    <div class="conmenu">
        <div class="father" th:each="menu : ${menus}">
            <div class="title">
                <img th:src="${menu.icon}" alt="">
                <span th:text="${menu.menuname}">成立公司</span>
                <i class="iconfont icon-xiala"></i>
            </div>
            <div class="sons">
                <div class="son" th:each="subm : ${menu.menuList}" th:if="${subm.type == person.type || subm.type == 3}"><a target="main_cont" th:href="@{${subm.url}(mid=${menu.id},sid=${subm.id},gradeid=${gradeid})}" th:text="${subm.menuname}">单元知识点</a></div>
            </div>
        </div>
    </div>
    <div class="cont_right">
        <div class="initer"><!-- src="person/information"-->
            <iframe width="100%" frameborder="0" scrolling="auto" th:src="@{person/information(gradeid=${gradeid})}" id="main_cont" name="main_cont"></iframe>
        </div>
    </div>
</div>
<div id="footer">
    <span>-</span>
    <span>BEJING UNION UNIVERSITY SOFTWARE SYSTEM. POWER BY RHHY.NET</span>
    <span>-</span>
</div>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/commen.js"></script>
<script>
    /**
     * 自定义iframe高度
     */
    function changeFrameHeight(){
        var iframe = document.getElementById('main_cont');
        var height = window.parent.document.documentElement.scrollHeight;//获取父页面高度减去差值
        if(document.all) { //判读ie w3c
            iframe.attachEvent("onload", function() { //ie 判断加载 
                var temph = $(document.body).height();
                $('iframe').css({
                    minHeight:temph >= 500 ? temph : height
                })
            });
        } else {
            iframe.onload = function() { //w3c判断加载
                var temph = $(document.body).height();
                $('iframe').css({
                    minHeight:temph >= 500 ? temph : height
                })
            }
        }
    }
    window.onresize=function(){ changeFrameHeight();}

    $(function(){
        changeFrameHeight();
        $("#gradeid").change(function () {
            location.href ="index?gradeid="+$(this).val();
        })
    });
</script>
</body>
</html>

